package com.permission.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.permission.entity.SysRoleAcl;

public interface SysRoleAclMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysRoleAcl record);

    int insertSelective(SysRoleAcl record);

    SysRoleAcl selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysRoleAcl record);

    int updateByPrimaryKey(SysRoleAcl record);
    
    //根据角色id集合查询权限ID集合
    List<Integer> getAclIdListByRoleIdList(@Param("roleIdList") List<Integer> roleIdList);

    //根据角色ID删除权限
    void deleteByRoleId(@Param("roleId") int roleId);

    //执行批量插入权限
    void batchInsert(@Param("roleAclList") List<SysRoleAcl> roleAclList);

    //根据权限ID获取角色ID集合
    List<Integer> getRoleIdListByAclId(@Param("aclId") int aclId);
}